import*as e from"../../lit-html/lit-html.js";import*as o from"../helpers/helpers.js";const s=new CSSStyleSheet;s.replaceSync(".node-label-name{color:var(--override-node-text-label-color,var(--color-token-tag))}.node-label-class{color:var(--override-node-text-class-color,var(--color-token-attribute))}.node-label-id{color:var(--override-node-text-id-color,var(--color-token-attribute))}.node-label-class.node-multiple-descriptors{color:var(--override-node-text-multiple-descriptors-class,var(--override-node-text-class-color,var(--color-token-attribute)))}.node-label-id.node-multiple-descriptors{color:var(--override-node-text-multiple-descriptors-id,var(--override-node-text-id-color,var(--color-token-attribute)))}\n/*# sourceURL=nodeText.css */\n");const{render:t,html:l}=e;class d extends HTMLElement{static litTagName=e.literal`devtools-node-text`;#e=this.attachShadow({mode:"open"});#o="";#s="";#t=[];connectedCallback(){this.#e.adoptedStyleSheets=[s]}set data(e){this.#o=e.nodeTitle,this.#s=e.nodeId,this.#t=e.nodeClasses,this.#l()}#l(){const o=Boolean(this.#s),s=Boolean(this.#t&&this.#t.length>0),d=[l`<span class="node-label-name">${this.#o}</span>`];if(this.#s){const o=e.Directives.classMap({"node-label-id":!0,"node-multiple-descriptors":s});d.push(l`<span class="${o}">#${CSS.escape(this.#s)}</span>`)}if(this.#t&&this.#t.length>0){const s=this.#t.map((e=>`.${CSS.escape(e)}`)).join(""),t=e.Directives.classMap({"node-label-class":!0,"node-multiple-descriptors":o});d.push(l`<span class="${t}">${s}</span>`)}t(l` ${d} `,this.#e,{host:this})}}o.CustomElements.defineComponent("devtools-node-text",d);var a=Object.freeze({__proto__:null,NodeText:d});export{a as NodeText};
